/*******************************************************************************
 * @file Copyright 2009 The CREATE Lab at CMU
 * 
 *       This file is part of JubJub, an open source project.
 *       http://code.google.com/p/jubjub/
 * 
 *       Redistribution and use in source and binary forms, with or without
 *       modification, are permitted provided that the following conditions are
 *       met:
 * 
 *       Redistributions of source code must retain the above copyright notice,
 *       this list of conditions and the following disclaimer.
 * 
 *       Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 * 
 *       Neither the name of Carnegie Mellon nor the names of its contributors
 *       may be used to endorse or promote products derived from this software
 *       without specific prior written permission.
 * 
 *       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *       "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *       LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 *       PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *       HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *       SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *       LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *       THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *       (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *       OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *******************************************************************************/

package edu.cmu.ri.createlab.jj.shapes;

public class ShapeDefs
{
   private static final double widthScale = 0.70;
   public static final int fontHeight = 16;
   public static final int fontDiff = 2;
   public static final int tabHeight = 20;
   public static final int tabWidth1 = 20;
   public static final int tabWidth2 = 27;
   public static final int minSpace = 6;
   public static final int varHeight = 27;
   public static final int varWidth = (int)(widthScale*200);
   public static final int varSymWidth = 13;
   public static final int cTitleWidth = (int)(widthScale*350);
   public static final int cTitleHeight = 31;
   public static final int mTitleWidth = (int)(widthScale*350);
   public static final int mTitleTopHeight = 31;
   public static final int mTitleBotHeight = 25;
   public static final int mReturnHeight = 46;
   public static final int normalWidth = (int)(widthScale*627);
   public static final int commentWidth = (int)(widthScale*627);
   public static final int commentHeight = 93;
   public static final int assignWidth = (int)(widthScale*295);
   public static final int assignAttachX = (int)(widthScale*293);
   public static final int assignHeight = 53;
   public static final int opWidth = (int)(widthScale*534);
   public static final int opHeight = 33;
   public static final int opSymHeight = 33;
   public static final int opSymWidth = (int)(widthScale*10);
   public static final int ioSymWidth = (int)(widthScale*32);
   public static final int ioSymHeight = 21;
   public static final int commentSize = 2;
   public static final int cTextHeight = 66;
   public static final int cTextWidth = (int)(commentWidth-widthScale*73);
   public static final int cTextIndent = (int)(widthScale*(100-38));
   public static final int valueWidth = (int)(widthScale*200);
   public static final int valueHeight = 27;
   
   public static final String fontName = "ARLRDBD.ttf";//"A.C.M.E. Explosive Bold.ttf";
   public static final int fontSize = 20;//16;
   public static final int nameXOffset = (int)(35*widthScale);
   public static final int constNameXOffset = (int)(251*widthScale);
   public static final int nameYOffset = 24;
   public static final int varNameXOffset = 20;
   public static final int varNameYOffset = 20;
   public static final int varTypeXOffset = 20;
   public static final int varTypeYOffset = 20;
   public static final int varSpaceYOffset = 6;
   public static final int varSpaceTopHeight = 31;
   public static final int varSpaceBotHeight = 27;
   public static final int varSpaceWidth = (int)(widthScale*581);
   public static final int opSymXOffset = (int)(widthScale*247);
   public static final int opSymYOffset = 24;
   public static final int opVarOffset1 = 20;
   public static final int opVarOffset2 = (int)(widthScale*291);
   public static final int ioNameXOffset = 20;
   public static final int ioNameYOffset = 20;
   public static final int middleHeight = 33;
   public static final int topHeight = 27;
   public static final int botHeight = 27;
   public static final int indentWidth = (int)(widthScale*23);
   public static final int flowTopHeight = 64;
   public static final int flowTopPlaceHeight = 38;
   public static final int flowBotHeight = 49;
   public static final int flowMidHeight = 54;
   public static final int flowMidPlaceHeight = 28;
   public static final int flowBotPlaceHeight = 28;
   public static final int flowWidth = (int)(widthScale*669);
   public static final int flowIfElseWidth = (int)(widthScale*627);
   
   public static final int varSpacing = 4;
   public static final int varIndent = 90;
   public static final int varValIndent = (int)(widthScale*240);
   
   public static final int paletteSpacing = 35;
   
   public static final int scrollDist = 80;
   
 ///left, middle, right, and preview
   public static final String iconDirRel = "/Graphics/blocks/";
   public static final String fontDirRel = "/Fonts/";
//   public static final String class_l = "class_01.png";
//   public static final String class_m = "class_02.png";
//   public static final String class_r = "class_03.png";
//   public static final String class_p = "class.png";
   
   ///tl = top left, tr = top right, i1 = indent 1, i2 = indent 2
   ///ml = middle left, mr = middle right, bl = bottom left, br = bottom right
   public static final String flow_if = "flow_if.png";
   public static final String flow_while = "flow_while_top.png";
   public static final String flow_else = "flow_else.png";
   public static final String flow_end_f = "flow_end_false.png";
   public static final String flow_end_t = "flow_end_false.png";//TODO update when image is added
   public static final String flow_end = "flow_while_bot.png";
   public static final String flow_mid_t = "flow_mid_true.png";
   public static final String flow_mid_f = "flow_mid_false.png";
   public static final String flow_mid = "flow_mid.png";
   
   public static final String var_num_box = "var_num_box.png";
   public static final String var_float_sym = "var_float_symbol.png";
   public static final String var_int_sym = "var_int_symbol.png";
   public static final String var_int_p = "var_int_preview.png";
   public static final String var_float_p = "var_float_preview.png";

   public static final String var_bool_box = "var_bool_box.png";
   public static final String var_bool_sym = "var_bool_symbol.png";
   public static final String var_bool_p = "var_bool_preview.png";
   
   public static final String var_obj_box = "var_object_box.png";
   public static final String var_obj_sym = "var_object_symbol.png";

   public static final String comm_t = "comment_top.png";
   public static final String comm_m = "comment_mid.png";
   public static final String comm_b = "comment_bot.png";
   
   public static final String block_t = "block_top.png";
   public static final String block_m = "block_mid.png";
   public static final String block_b = "block_bot.png";
   
   public static final String sym_in = "input_symbol.png";
   public static final String sym_out = "output_symbol.png";
   
   public static final String vspace_t = "var_space_top.png";
   public static final String vspace_m = "var_space_mid.png";
   public static final String vspace_b = "var_space_bot.png";
   
   public static final String meth_t = "method_title_top.png";
   public static final String meth_m = "method_title_mid.png";
   public static final String meth_b = "method_title_bot.png";
   public static final String meth_r = "method_return.png";

   public static final String op_bool_box = "op_bool_box.png";
   public static final String op_bool_sym = "op_bool_symbol.png";
   public static final String op_num_box = "op_num_box.png";
   public static final String op_ass_box = "assign.png";
   
   public static final String error_icon = "/Graphics/Compile Error.jpg";
   
   public static final int METH_PIECES = 4;
   
   public static final int METH_T = 0;
   public static final int METH_M = 1;
   public static final int METH_B = 2;
   public static final int METH_R = 3;
   
   public static final int COMM_PIECES = 3;

   public static final int COMM_T = 0;
   public static final int COMM_M = 1;
   public static final int COMM_B = 2;
   
   public static final int BLOCK_PIECES = 5;

   public static final int BLOCK_T = 0;
   public static final int BLOCK_M = 1;
   public static final int BLOCK_B = 2;
   public static final int SYM_IN = 3;
   public static final int SYM_OUT = 4;
   
   public static final int VSPACE_PIECES = 3;
   
   public static final int VSPACE_T = 0;
   public static final int VSPACE_M = 1;
   public static final int VSPACE_B = 2;
   
   //TODO add in end_t
   public static final int FLOW_PIECES = 8;
   
   public static final int FLOW_IF = 0;
   public static final int FLOW_WHILE = 1;
   public static final int FLOW_ELSE = 2;
   public static final int FLOW_END = 3;
   public static final int FLOW_END_F = 4;
   public static final int FLOW_MID_F = 5;
   public static final int FLOW_MID_T = 6;
   public static final int FLOW_MID = 7;
   
   public static final int VAR_PIECES = 7;
   
   public static final int VAR_NUM_BOX = 0;
   public static final int VAR_BOOL_BOX = 1;
   public static final int VAR_FLOAT_SYM = 2;
   public static final int VAR_INT_SYM = 3;
   public static final int VAR_BOOL_SYM = 4;
   public static final int VAR_OBJ_BOX = 5;
   public static final int VAR_OBJ_SYM = 6;
   
   public static final int OP_PIECES = 4;
   
   public static final int OP_NUM_BOX = 0;
   public static final int OP_BOOL_BOX = 1;
   public static final int OP_ASS_BOX = 2;
   public static final int OP_BOOL_SYM = 3;
   
   public static final int DY_CODE = 0;
   public static final int DY_VAR = 1;
   
   
   public enum IndentTypes
   {
      DEFAULT,
      TRUE,
      FALSE
   }
}
